home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48_1 / air.tab < prev    next >
Internet Message Format  |  1995-03-23  |  5KB

  1. From comp.sys.handhelds Tue Jan 22 18:54:51 1991
  2. Path: mentor.cc.purdue.edu!purdue!ccncsu!longs.LANCE.ColoState.EDU!jn190068
  3. From: jn190068@longs.LANCE.ColoState.EDU (Jay Nestle)
  4. Newsgroups: comp.sys.handhelds
  5. Subject: Std Air Tables
  6. Message-ID: <12221@ccncsu.ColoState.EDU>
  7. Date: 22 Jan 91 18:08:44 GMT
  8. Sender: news@ccncsu.ColoState.EDU
  9. Reply-To: jn190068@longs.LANCE.ColoState.EDU (Jay Nestle)
  10. Organization: Engineering College, Colorado State University
  11. Lines: 40
  12.  
  13.  
  14.     Following is the documentation file for my program
  15. that calculated temp, pressure, and density of air at 
  16. altitudes from 0m to 105,000m.  Following this is a post of
  17. the downloadable source for the hp48.
  18.  
  19. jn190068@longs.lance.colostate.edu
  20.  
  21.    "Save the earth, develop space."  -  Bumper Sticker
  22.  
  23. This program by:  Jay Nestle, January 1991  Colorado State University
  24.  
  25.         This program uses several algorithms to calculate the temperature,
  26. pressure, and density of air at a certain altitude.  The algorithm was adapted
  27. from Introduction to flight, third edition.  The standard atmosphere calculated
  28. is a common one used throughout the aerospace industry.  The original model
  29. was the 1959 ARDC (the U.S. Air Force's previous Air Research and Development
  30. Command).  The algorithms are outlined in the above mentioned text on pages 74
  31. through page 77.
  32.  
  33.         This should be useful to anyone who constantly uses tables to look up
  34. temp, pressure, and density from altitudes from 0m to 105000m.  The program is
  35. not copyrighted and can be freely distributed, I hope someone can make use of
  36. it.
  37.  
  38.         The custom menu is only an example of what someone might wish to use.
  39. Please feel free to use or not use this CST menu.  Without the CST just press
  40. run and the program will start, likewise with the CST.  Without the CST the
  41. program is less than 2K.
  42.  
  43.         Units used:  SI system
  44.         Temp            K
  45.         Pressure        Pa
  46.         Density         kg/m^3
  47.         Height          m
  48.  
  49.         Further modifications could be made to give English units fairly
  50. easy.  The program simply checks for what altitude is desired and then uses
  51. the correct algorithm for that altitude region, modifying the lapse rate, A
  52. and the various other starting point constants.
  53.  
  54. From comp.sys.handhelds Tue Jan 22 18:55:01 1991
  55. Path: mentor.cc.purdue.edu!purdue!ccncsu!longs.LANCE.ColoState.EDU!jn190068
  56. From: jn190068@longs.LANCE.ColoState.EDU (Jay Nestle)
  57. Newsgroups: comp.sys.handhelds
  58. Subject: Std Air Tables PRG
  59. Message-ID: <12222@ccncsu.ColoState.EDU>
  60. Date: 22 Jan 91 18:14:53 GMT
  61. Sender: news@ccncsu.ColoState.EDU
  62. Reply-To: jn190068@longs.LANCE.ColoState.EDU (Jay Nestle)
  63. Organization: Engineering College, Colorado State University
  64. Lines: 155
  65.  
  66. Below is the source code for my air tables program as
  67. described in a earlier post.
  68.  
  69. jn190068@longs.lance.colostate.edu
  70.  
  71.    "Save the earth, develop space."  -  Bumper Sticker
  72.  
  73. %%HP: T(3)A(D)F(.);
  74. DIR
  75.   CST {
  76. GROB 21 8 0C70000290000013A00094110017110294E10984010603E0
  77. GROB 21 8 400000800000803000484000080000003000044000083000
  78. "STD" "ATM" "TABLE"
  79. RUN }
  80.   RUN
  81.     \<<
  82. "Prg by Jay Nestle"
  83. DROP
  84. "Geopotential Alt? (m)
  85. (height above sea lvl)"
  86. ":height?:" INPUT
  87. OBJ\-> OBJ\-> DROP 'H'
  88. STO TST1
  89.     \>>
  90.   PVRS
  91.     \<< { P T \Gr }
  92. PURGE
  93.     \>>
  94.   DSPR
  95.     \<< H "Ht (m)"
  96. \->TAG T "T (K)" \->TAG
  97. P "P (Pa)" \->TAG \Gr
  98. "\Gr (kg/m^3)" \->TAG
  99. PVRS
  100.     \>>
  101.   PREV1
  102.     \<< E3.14 EVAL
  103. OBJ\-> DROP DROP 4
  104. RND SWAP STO E3.13
  105. EVAL OBJ\-> DROP DROP
  106. 5 RND SWAP STO
  107. E3.12 EVAL OBJ\->
  108. DROP DROP 4 RND
  109. SWAP STO DSPR
  110.     \>>
  111.   PREV2
  112.     \<< E3.9 EVAL
  113. OBJ\-> DROP DROP 4
  114. RND SWAP STO E3.10
  115. EVAL OBJ\-> DROP DROP
  116. 5 RND SWAP STO DSPR
  117. \>>
  118.   OVPRG
  119.     \<<
  120. "That's in space!"
  121.     \>>
  122.   TST7
  123.     \<<
  124.       IF H 105000 >
  125.       THEN OVPRG
  126.       ELSE 90000
  127. 'H0' STO 165.66
  128. 'T0' STO .004 'A'
  129. STO .1105 'P0' STO
  130. 0 '\Gr0' STO PREV1
  131.       END
  132.     \>>
  133.   TST6
  134.     \<<
  135.       IF H 90000 >
  136.       THEN TST7
  137.       ELSE 79000
  138. 'H0' STO 165.66 'T'
  139. STO 1.0669 'P0' STO
  140. .00002244 '\Gr0' STO
  141. PREV2
  142.       END
  143.     \>>
  144.   TST5
  145.     \<<
  146.       IF H 79000 >
  147.       THEN TST6
  148.       ELSE 53000
  149. 'H0' STO 282.66
  150. 'T0' STO -.0045 'A'
  151. STO 61.493 'P0' STO
  152. .00075791 '\Gr0' STO
  153. PREV1
  154.       END
  155.     \>>
  156.   TST4
  157.     \<<
  158.       IF H 53000 >
  159.       THEN TST5
  160.       ELSE 47000
  161. 'H0' STO 282.66 'T'
  162. STO 125.58 'P0' STO
  163. .0015535 '\Gr0' STO
  164. PREV2
  165.       END
  166.     \>>
  167.   TST3
  168.     \<<
  169.       IF H 47000 >
  170.       THEN TST4
  171.       ELSE 25000
  172. 'H0' STO 216.16
  173. 'T0' STO .003 'A'
  174. STO 2527.3 'P0' STO
  175. .040639 '\Gr0' STO
  176. PREV1
  177.       END
  178.     \>>
  179.   TST2
  180.     \<<
  181.       IF H 25000 >
  182.       THEN TST3
  183.       ELSE 11000
  184. 'H0' STO 216.66 'T'
  185. STO 22700 'P0' STO
  186. .3648 '\Gr0' STO
  187. PREV2
  188.       END
  189.     \>>
  190.   TST1
  191.     \<<
  192.       IF H 11000 >
  193.       THEN TST2
  194.       ELSE 0 'H0'
  195. STO 288.16 'T0' STO
  196. -.0065 'A' STO
  197. 101325 'P0' STO
  198. 1.225 '\Gr0' STO
  199. PREV1
  200.       END
  201.     \>>
  202.   E3.9 'P=P0*EXP((
  203. H0-H)*G/(R*T))'
  204.   E3.10 '\Gr=\Gr0*EXP((
  205. H0-H)*G/(R*T))'
  206.   E3.12 'P=P0*(T/T0
  207. )^-(G/(A*R))'
  208.   E3.13 '\Gr=\Gr0*(T/T0
  209. )^-(G/(A*R)+1)'
  210.   E3.14 'T=T0+A*(H-
  211. H0)'
  212.   \Gr0 1.225
  213.   P0 101325
  214.   G 9.8
  215.   R 287
  216.   A -.0065
  217.   T0 288.16
  218.   H0 0
  219.   H 10000
  220. END
  221.  
  222.